//
//  User.m
//  MYChatting
//
//  Created by mac on 16/8/19.
//  Copyright © 2016年 lhf. All rights reserved.
//

#import "User.h"

@implementation User

+ (NSArray *)properties{
    
    return @[@"id",@"name",@"profile_image_url",@"verified_type",@"mbrank"];
}

+ (instancetype)userWithDict:(NSDictionary *)dict{
    id obj = [[self alloc] init];
    for (NSString *property in [self properties]) {
        if (dict[property] != nil) {
            [obj setValue:dict[property] forKey:property];
        }
    }
    return obj;
}

@end
